<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>yLib: /home/sky/yLib/include/core/yallocator.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">yLib
   &#160;<span id="projectnumber">V0.0.9 beta</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('yallocator_8hpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">yallocator.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="yallocator_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * @Author: Sky</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * @Date: 2020-05-22 10:00:54</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * @LastEditors: Sky</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * @LastEditTime: 2020-11-30 15:23:04</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * @Description: </span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#ifndef __YLIB_CORE_YALLOCATOR_HPP__</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#define __YLIB_CORE_YALLOCATOR_HPP__</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160; </div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="yobject_8hpp.html">yobject.hpp</a>&quot;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;new&gt;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;cstddef&gt;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceyLib.html">yLib</a>{</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <span class="comment">//new operator: allocate memory and construct object</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <span class="comment">//operator new: allocate memory</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    <span class="comment">//placement new: construct object on an exsit memory</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;</div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html">   28</a></span>&#160;    <span class="keyword">class </span><a class="code" href="classyLib_1_1yBasicAllocator.html">yBasicAllocator</a> <a class="code" href="yobject_8hpp.html#a456ca9afeca82fe693720d57ef746192">MACRO_PUBLIC_INHERIT_YOBJECT</a></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    {</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#ace1221d18f821a14896eb2acecf8d56c">   31</a></span>&#160;        <span class="keyword">typedef</span> T               <a class="code" href="classyLib_1_1yBasicAllocator.html#ace1221d18f821a14896eb2acecf8d56c">value_type</a>;</div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#adc6649dc9cdb1db1e9414654e1d1f4dc">   32</a></span>&#160;        <span class="keyword">typedef</span> T*              <a class="code" href="classyLib_1_1yBasicAllocator.html#adc6649dc9cdb1db1e9414654e1d1f4dc">pointer</a>;</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#a7cb0b3a23165aeab48a8cfa790b11560">   33</a></span>&#160;        <span class="keyword">typedef</span> <span class="keyword">const</span> T*        <a class="code" href="classyLib_1_1yBasicAllocator.html#a7cb0b3a23165aeab48a8cfa790b11560">const_pointer</a>;</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#a6b07a6bf07a98c8e2830b3bd4acccaf6">   34</a></span>&#160;        <span class="keyword">typedef</span> T&amp;              <a class="code" href="classyLib_1_1yBasicAllocator.html#a6b07a6bf07a98c8e2830b3bd4acccaf6">reference</a>;</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#aa89d64c8f2e2bfa3421c635d6f4e54db">   35</a></span>&#160;        <span class="keyword">typedef</span> <span class="keyword">const</span> T&amp;        <a class="code" href="classyLib_1_1yBasicAllocator.html#aa89d64c8f2e2bfa3421c635d6f4e54db">const_reference</a>;</div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#ab08eba49349b99dbb249c67e05c4bd43">   36</a></span>&#160;        <span class="keyword">typedef</span> T&amp;&amp;             <a class="code" href="classyLib_1_1yBasicAllocator.html#ab08eba49349b99dbb249c67e05c4bd43">rreference</a>;</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#ad773fe9868b90172228552c538bbfa91">   37</a></span>&#160;        <span class="keyword">typedef</span> <span class="keyword">const</span> T&amp;&amp;       <a class="code" href="classyLib_1_1yBasicAllocator.html#ad773fe9868b90172228552c538bbfa91">const_rreference</a>;</div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#ae80e1085e61306bbe08b7b7df203c039">   38</a></span>&#160;        <span class="keyword">typedef</span> <span class="keywordtype">size_t</span>          <a class="code" href="classyLib_1_1yBasicAllocator.html#ae80e1085e61306bbe08b7b7df203c039">size_type</a>;</div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#add7cb549cd0f0edaa88f65e1a4290b2a">   39</a></span>&#160;        <span class="keyword">typedef</span> ptrdiff_t       <a class="code" href="classyLib_1_1yBasicAllocator.html#add7cb549cd0f0edaa88f65e1a4290b2a">difference_type</a>;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">class</span> U&gt;</div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="structyLib_1_1yBasicAllocator_1_1rebind.html">   46</a></span>&#160;        <span class="keyword">struct </span><a class="code" href="structyLib_1_1yBasicAllocator_1_1rebind.html">rebind</a></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        {</div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="structyLib_1_1yBasicAllocator_1_1rebind.html#a30c9d3531c752fe8253ec61a31b43a7d">   48</a></span>&#160;            <span class="keyword">typedef</span> <a class="code" href="classyLib_1_1yBasicAllocator.html">yBasicAllocator&lt;U&gt;</a> <a class="code" href="structyLib_1_1yBasicAllocator_1_1rebind.html#a30c9d3531c752fe8253ec61a31b43a7d">other</a>;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        };</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keyword">private</span>:</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        <span class="comment">/* data */</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    </div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#a47124bf9d71472efa81048b7fbe4414d">   66</a></span>&#160;        <a class="code" href="classyLib_1_1yBasicAllocator.html#adc6649dc9cdb1db1e9414654e1d1f4dc">pointer</a> <a class="code" href="classyLib_1_1yBasicAllocator.html#a47124bf9d71472efa81048b7fbe4414d">allocate</a>(<a class="code" href="classyLib_1_1yBasicAllocator.html#ae80e1085e61306bbe08b7b7df203c039">size_type</a> n, <span class="keyword">const</span> <span class="keywordtype">void</span> * hint=<span class="keyword">static_cast&lt;</span><span class="keyword">const </span><span class="keywordtype">void</span>*<span class="keyword">&gt;</span>(0)){</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;            </div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;            <span class="comment">//malloc</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><a class="code" href="classyLib_1_1yBasicAllocator.html#adc6649dc9cdb1db1e9414654e1d1f4dc">pointer</a><span class="keyword">&gt;</span>(::operator <span class="keyword">new</span>( (size_t)(<span class="keyword">sizeof</span>(T) * n) ));</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        }</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#ab0508bde09428fa387f61741cc1d1194">   80</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classyLib_1_1yBasicAllocator.html#ab0508bde09428fa387f61741cc1d1194">deallocate</a>(<a class="code" href="classyLib_1_1yBasicAllocator.html#adc6649dc9cdb1db1e9414654e1d1f4dc">pointer</a> p, <a class="code" href="classyLib_1_1yBasicAllocator.html#ae80e1085e61306bbe08b7b7df203c039">size_type</a> n) {</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            <span class="comment">//free</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;            ::operator <span class="keyword">delete</span>(p);</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        }</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#a97c8d2509160ce700d1c6887e721ea9e">   94</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classyLib_1_1yBasicAllocator.html#a97c8d2509160ce700d1c6887e721ea9e">construct</a>(<a class="code" href="classyLib_1_1yBasicAllocator.html#adc6649dc9cdb1db1e9414654e1d1f4dc">pointer</a> p, <a class="code" href="classyLib_1_1yBasicAllocator.html#aa89d64c8f2e2bfa3421c635d6f4e54db">const_reference</a> value) {</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160; </div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;            <span class="keyword">new</span> ((<span class="keywordtype">void</span> *)p) T(value);<span class="comment">//inplace new</span></div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        }</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160; </div>
<div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#a8ae63e65f6b5e6705746b92ce4a5ac52">  107</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classyLib_1_1yBasicAllocator.html#a8ae63e65f6b5e6705746b92ce4a5ac52">construct</a>(<a class="code" href="classyLib_1_1yBasicAllocator.html#adc6649dc9cdb1db1e9414654e1d1f4dc">pointer</a> p, <a class="code" href="classyLib_1_1yBasicAllocator.html#ad773fe9868b90172228552c538bbfa91">const_rreference</a> value) {</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;            <span class="keyword">new</span> ((<span class="keywordtype">void</span> *)p) T(value);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        }</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160; </div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#a21b29dcbc20277148840485b8c78b5d9">  119</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classyLib_1_1yBasicAllocator.html#a21b29dcbc20277148840485b8c78b5d9">destroy</a>(<a class="code" href="classyLib_1_1yBasicAllocator.html#adc6649dc9cdb1db1e9414654e1d1f4dc">pointer</a> p) {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;            </div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;            p-&gt;~T();</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        }</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160; </div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#ae8cac14e62a1e99461078930bfa0f4aa">  130</a></span>&#160;        <a class="code" href="classyLib_1_1yBasicAllocator.html#ae80e1085e61306bbe08b7b7df203c039">size_type</a> <a class="code" href="classyLib_1_1yBasicAllocator.html#ae8cac14e62a1e99461078930bfa0f4aa">max_size</a>()<span class="keyword"> const</span>{</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160; </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            <span class="keywordflow">return</span> UINTMAX_MAX/<span class="keyword">sizeof</span>(T);</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        }</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#a5e94ddd966982f280bd0768757463a65">  144</a></span>&#160;        <a class="code" href="classyLib_1_1yBasicAllocator.html#adc6649dc9cdb1db1e9414654e1d1f4dc">pointer</a> <a class="code" href="classyLib_1_1yBasicAllocator.html#a5e94ddd966982f280bd0768757463a65">address</a>(<a class="code" href="classyLib_1_1yBasicAllocator.html#a6b07a6bf07a98c8e2830b3bd4acccaf6">reference</a> x)<span class="keyword"> const</span>{</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;            <span class="keywordflow">return</span> (<a class="code" href="classyLib_1_1yBasicAllocator.html#adc6649dc9cdb1db1e9414654e1d1f4dc">pointer</a>)&amp;x;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        }</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160; </div>
<div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="classyLib_1_1yBasicAllocator.html#a8b114befe01f3490c3b5bcd84db9a32b">  156</a></span>&#160;        <a class="code" href="classyLib_1_1yBasicAllocator.html#a7cb0b3a23165aeab48a8cfa790b11560">const_pointer</a> <a class="code" href="classyLib_1_1yBasicAllocator.html#a8b114befe01f3490c3b5bcd84db9a32b">address</a>(<a class="code" href="classyLib_1_1yBasicAllocator.html#aa89d64c8f2e2bfa3421c635d6f4e54db">const_reference</a> x)<span class="keyword"> const</span>{</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160; </div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;            <span class="keywordflow">return</span> (<a class="code" href="classyLib_1_1yBasicAllocator.html#a7cb0b3a23165aeab48a8cfa790b11560">const_pointer</a>)&amp;x;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        }</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160; </div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    };</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160; </div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;}</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160; </div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160; </div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="preprocessor">#endif //__YLIB_CORE_YALLOCATOR_HPP__</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_a21b29dcbc20277148840485b8c78b5d9"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#a21b29dcbc20277148840485b8c78b5d9">yLib::yBasicAllocator::destroy</a></div><div class="ttdeci">void destroy(pointer p)</div><div class="ttdoc">destructor.</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:119</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_ae80e1085e61306bbe08b7b7df203c039"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#ae80e1085e61306bbe08b7b7df203c039">yLib::yBasicAllocator::size_type</a></div><div class="ttdeci">size_t size_type</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:38</div></div>
<div class="ttc" id="astructyLib_1_1yBasicAllocator_1_1rebind_html"><div class="ttname"><a href="structyLib_1_1yBasicAllocator_1_1rebind.html">yLib::yBasicAllocator::rebind</a></div><div class="ttdoc">The element of yBasicAllocator.</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:47</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_a6b07a6bf07a98c8e2830b3bd4acccaf6"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#a6b07a6bf07a98c8e2830b3bd4acccaf6">yLib::yBasicAllocator::reference</a></div><div class="ttdeci">T &amp; reference</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:34</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_a5e94ddd966982f280bd0768757463a65"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#a5e94ddd966982f280bd0768757463a65">yLib::yBasicAllocator::address</a></div><div class="ttdeci">pointer address(reference x) const</div><div class="ttdoc">calculate the addr of reference(x).</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:144</div></div>
<div class="ttc" id="astructyLib_1_1yBasicAllocator_1_1rebind_html_a30c9d3531c752fe8253ec61a31b43a7d"><div class="ttname"><a href="structyLib_1_1yBasicAllocator_1_1rebind.html#a30c9d3531c752fe8253ec61a31b43a7d">yLib::yBasicAllocator::rebind::other</a></div><div class="ttdeci">yBasicAllocator&lt; U &gt; other</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:48</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_ae8cac14e62a1e99461078930bfa0f4aa"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#ae8cac14e62a1e99461078930bfa0f4aa">yLib::yBasicAllocator::max_size</a></div><div class="ttdeci">size_type max_size() const</div><div class="ttdoc">calculate the max-num of T.</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:130</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_ab08eba49349b99dbb249c67e05c4bd43"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#ab08eba49349b99dbb249c67e05c4bd43">yLib::yBasicAllocator::rreference</a></div><div class="ttdeci">T &amp;&amp; rreference</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:36</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_a8b114befe01f3490c3b5bcd84db9a32b"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#a8b114befe01f3490c3b5bcd84db9a32b">yLib::yBasicAllocator::address</a></div><div class="ttdeci">const_pointer address(const_reference x) const</div><div class="ttdoc">calculate the const addr of reference(x)..</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:156</div></div>
<div class="ttc" id="ayobject_8hpp_html_a456ca9afeca82fe693720d57ef746192"><div class="ttname"><a href="yobject_8hpp.html#a456ca9afeca82fe693720d57ef746192">MACRO_PUBLIC_INHERIT_YOBJECT</a></div><div class="ttdeci">#define MACRO_PUBLIC_INHERIT_YOBJECT</div><div class="ttdoc">The public inherit from yObject.</div><div class="ttdef"><b>Definition:</b> yobject.hpp:101</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_a7cb0b3a23165aeab48a8cfa790b11560"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#a7cb0b3a23165aeab48a8cfa790b11560">yLib::yBasicAllocator::const_pointer</a></div><div class="ttdeci">const T * const_pointer</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:33</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_add7cb549cd0f0edaa88f65e1a4290b2a"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#add7cb549cd0f0edaa88f65e1a4290b2a">yLib::yBasicAllocator::difference_type</a></div><div class="ttdeci">ptrdiff_t difference_type</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:39</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_ace1221d18f821a14896eb2acecf8d56c"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#ace1221d18f821a14896eb2acecf8d56c">yLib::yBasicAllocator::value_type</a></div><div class="ttdeci">T value_type</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:31</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_ad773fe9868b90172228552c538bbfa91"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#ad773fe9868b90172228552c538bbfa91">yLib::yBasicAllocator::const_rreference</a></div><div class="ttdeci">const T &amp;&amp; const_rreference</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:37</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_ab0508bde09428fa387f61741cc1d1194"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#ab0508bde09428fa387f61741cc1d1194">yLib::yBasicAllocator::deallocate</a></div><div class="ttdeci">void deallocate(pointer p, size_type n)</div><div class="ttdoc">free memory.</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:80</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_aa89d64c8f2e2bfa3421c635d6f4e54db"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#aa89d64c8f2e2bfa3421c635d6f4e54db">yLib::yBasicAllocator::const_reference</a></div><div class="ttdeci">const T &amp; const_reference</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:35</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_a97c8d2509160ce700d1c6887e721ea9e"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#a97c8d2509160ce700d1c6887e721ea9e">yLib::yBasicAllocator::construct</a></div><div class="ttdeci">void construct(pointer p, const_reference value)</div><div class="ttdoc">copy-construct a obj on exsited memory.</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:94</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html">yLib::yBasicAllocator</a></div><div class="ttdoc">This is a basic mem-allocator in yLib.</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:29</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_a47124bf9d71472efa81048b7fbe4414d"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#a47124bf9d71472efa81048b7fbe4414d">yLib::yBasicAllocator::allocate</a></div><div class="ttdeci">pointer allocate(size_type n, const void *hint=static_cast&lt; const void * &gt;(0))</div><div class="ttdoc">Allocate memory.</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:66</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_adc6649dc9cdb1db1e9414654e1d1f4dc"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#adc6649dc9cdb1db1e9414654e1d1f4dc">yLib::yBasicAllocator::pointer</a></div><div class="ttdeci">T * pointer</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:32</div></div>
<div class="ttc" id="aclassyLib_1_1yBasicAllocator_html_a8ae63e65f6b5e6705746b92ce4a5ac52"><div class="ttname"><a href="classyLib_1_1yBasicAllocator.html#a8ae63e65f6b5e6705746b92ce4a5ac52">yLib::yBasicAllocator::construct</a></div><div class="ttdeci">void construct(pointer p, const_rreference value)</div><div class="ttdoc">move-construct a obj on exsited memory.</div><div class="ttdef"><b>Definition:</b> yallocator.hpp:107</div></div>
<div class="ttc" id="ayobject_8hpp_html"><div class="ttname"><a href="yobject_8hpp.html">yobject.hpp</a></div></div>
<div class="ttc" id="anamespaceyLib_html"><div class="ttname"><a href="namespaceyLib.html">yLib</a></div><div class="ttdoc">This is a top namespace in yLib.</div><div class="ttdef"><b>Definition:</b> ylinuxerrnohelper.cpp:28</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_3d69f64eaf81436fe2b22361382717e5.html">core</a></li><li class="navelem"><a class="el" href="yallocator_8hpp.html">yallocator.hpp</a></li>
    <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
  </ul>
</div>
</body>
</html>
